package com.cj.bus.config;

import javax.sql.DataSource;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import com.alibaba.druid.pool.DruidDataSource;

/**
 * druid连接池配置
 */
@Configuration
public class DruidConfig {

    /***** 配置Druid的监控 *****/
    /**
     * 1、配置一个管理后台的Servlet
     *
     * @return
     */

    /**
     * 配置Druid数据库连接池
     *
     * @return
     */
    @ConfigurationProperties(prefix = "spring.datasource")
    @Bean
    public DataSource erpBaseDataSource() {
        return new DruidDataSource();
    }


}
